package com.vast.ui.panel.fullcolorled.preferences;

import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IntegerFieldEditor;
import org.eclipse.jface.preference.RadioGroupFieldEditor;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

import com.vast.ui.panel.fullcolorled.Activator;


public class PreferencePage extends FieldEditorPreferencePage 
	implements IWorkbenchPreferencePage {

	public PreferencePage() {
		// TODO Auto-generated constructor stub
		super(GRID);
		setPreferenceStore(Activator.getDefault().getPreferenceStore());
		setDescription("Button Panel Preferences");
	}

	public void init(IWorkbench workbench) {
		// TODO Auto-generated method stub

	}

	protected void createFieldEditors() {
		// TODO Auto-generated method stub
		addField(new IntegerFieldEditor(PreferenceConstants.P_SOCKET_PORTNUMBER, 
				"Port Number for Socket :", getFieldEditorParent()));
		addField(new IntegerFieldEditor(PreferenceConstants.P_COLUMN_NUMBER, 
				"Number of column :", getFieldEditorParent()));
		addField(new IntegerFieldEditor(PreferenceConstants.P_LINE_NUMBER, 
				"Number of line :", getFieldEditorParent()));
		addField(new StringFieldEditor(PreferenceConstants.P_RESET_VALUE, 
				"Initial Value(Hex) : 0x", getFieldEditorParent()));
		addField(new RadioGroupFieldEditor(
				PreferenceConstants.P_WAIT_VALUE,
					"Wait of Recv Thread",
					1,
					new String[][] { 
						{"Resonable (Recommend)", "5" },
						{"Tight", "2" },
						{"Very Tight", "1" },
						{"None ", "0" }
					}, getFieldEditorParent()));
	}
}
